﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Controls;
using System.Windows.Media;
using UBCon.Core.Enums;
using UBCon.Ribbon.Interfaces;

namespace UBCon.Ribbon
{
    public class RibbonRadioButton:RadioButton, IRibbonControl
    {
        #region Constructors
        static RibbonRadioButton() 
        {
            Type ownerType=typeof(RibbonRadioButton);
            
            RibbonRadioButton.DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType));
        }

        public RibbonRadioButton() 
            :base()
        {
            
        }
        #endregion

        #region Properties

        public ImageSource Image
        {
            get { return (ImageSource)GetValue(ImageProperty); }
            set { SetValue(ImageProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Image.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ImageProperty = RibbonButton.ImageProperty.AddOwner(typeof(RibbonRadioButton));


        public RibbonControlSize Size
        {
            get { return (RibbonControlSize)GetValue(SizeProperty); }
            set { SetValue(SizeProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Size.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SizeProperty =
            DependencyProperty.Register("Size", typeof(RibbonControlSize), typeof(RibbonRadioButton), new FrameworkPropertyMetadata(RibbonControlSize.Small));

        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set { SetValue(TitleProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Title.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TitleProperty = RibbonButton.TitleProperty.AddOwner(typeof(RibbonRadioButton));

        //public string GroupName
        //{
        //    get { return (string)GetValue(GroupNameProperty); }
        //    set { SetValue(GroupNameProperty, value); }
        //}

        //// Using a DependencyProperty as the backing store for GroupName.  This enables animation, styling, binding, etc...
        //public static readonly DependencyProperty GroupNameProperty = RadioButton.GroupNameProperty.AddOwner(typeof(RibbonRadioButton));

        #endregion

        #region Depenency Property Changed Callbacks
        #endregion

        #region Overrides
        #endregion

        #region Private Utilities
        #endregion

        #region Event Handlers
        #endregion

        #region Fields
        #endregion

        #region Events
        #endregion

        #region IRibbonControl Implementation

        /// <summary>
        /// Gets a boolean value indicating whether the contol's size is large
        /// </summary>
        public bool IsLarge
        {
            get { return this.Size == RibbonControlSize.Large; }
        }

        #endregion
    }
}
